<template>
    <p>{{ author.name }}</p>
    <p>{{ authorContent }}</p>
    <p>{{ authorContentMethod() }}</p>
</template>
<script>
export default {
    data() {
        return {
            author: {
                name: 'Jxz',
                books: [
                    'Vue 2 - Advanced Guide',
                    'Vue 3 - Basic Guide',
                    'Vue 4 - The Mystery'
                ]
            }
        }
    },
    computed: {
        authorContent() {
            return this.author.books.length > 0 ? 'Yes' : 'No'
        }
    },
    methods: {
        authorContentMethod() {
            return this.author.books.length > 0 ? 'Yes' : 'No'
        }
    }
}
</script>